import { Input, Space } from "antd"

import { SFormItem } from "@/components/common"
import { useLocale } from "@/locales"

interface IProps {
	name?: string[]
}

const FrozenRebateAmountInput = ({ name }: IProps) => {
	const { formatMessage } = useLocale()
	return (
		<Space.Compact>
			<SFormItem label={formatMessage({ id: "risk.frozen_rebate_amount" })} name={name ? name[0] : "frozenRebateMin"}>
				<Input placeholder={formatMessage({ id: "risk.min_value" })} />
			</SFormItem>
			<SFormItem name={name ? name[1] : "frozenRebateMax"}>
				<Input placeholder={formatMessage({ id: "risk.max_value" })} />
			</SFormItem>
		</Space.Compact>
	)
}

export default FrozenRebateAmountInput
